$(document).ready(function() {
    $(".forestiere").click(function() {
        location.href="/exploatare-forestiera/despre-noi";
    });

    $(".constructii").click(function() {
        location.href="/constructii/despre-noi";
    });

    $(".inchirieri").click(function() {
        location.href="/inchirieri-utilaje/despre-noi";
    });

    $('#leftContent').mouseover(function(){
        $('#ex1').addClass("redbold");
    })

    $('#leftContent').mouseout(function(){
        $('#ex1').removeClass("redbold");
    })

    $('#box_constructii').mouseover(function(){
        $('#ex2').addClass("redbold");
    })

    $('#box_constructii').mouseout(function(){
        $('#ex2').removeClass("redbold");
    })

    $('#box_inchirieri').mouseover(function(){
        $('#ex3').addClass("redbold");
    })

    $('#box_inchirieri').mouseout(function(){
        $('#ex3').removeClass("redbold");
    })
    
    $("#show_fag_furnir").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/fag/furnir",
            success: function (response) {
                $('#gallery').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#show_fag_bustean").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/fag/bustean",
            success: function (response) {
                $('#gallery').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#show_fag_foc_paletat").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/fag/lemn-de-foc-paletat",
            success: function (response) {
                $('#gallery').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#show_fag_foc_sectionat").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/fag/lemn-de-foc-sectionat",
            success: function (response) {
                $('#gallery').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#show_stejar_bustean").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/stejar/bustean",
            success: function (response) {
                $('#gallery2').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#show_stejar_foc").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/stejar/foc",
            success: function (response) {
                $('#gallery2').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#show_carpen_foc").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/carpen/foc",
            success: function (response) {
                $('#gallery3').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#show_escavator").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/escavator",
            success: function (response) {
                $('#gallery').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#show_roller").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/roler",
            success: function (response) {
                $('#gallery2').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#show_autoutilitara").live('click', function() {
        $.ajax({
            type: "POST",
            url: "/galerie/autoutilitara",
            success: function (response) {
                $('#gallery3').html(response);
                var galleries = $('.ad-gallery').adGallery();
            }
        });
    });
    
    $("#close_gallery").live('click', function() {
        $('#gallery').html('');
        $('#gallery2').html('');
        $('#gallery3').html('');
    });
});